/**
 * 保存Token到本地存储
 */
export const setToken = (token: string) => {
  localStorage.setItem('token', token);
};

/**
 * 从本地存储获取Token
 */
export const getToken = (): string | null => {
  return localStorage.getItem('token');
};

/**
 * 从本地存储移除Token
 */
export const removeToken = () => {
  localStorage.removeItem('token');
};

/**
 * 检查是否已登录
 */
export const isLoggedIn = (): boolean => {
  return !!getToken();
};
    